//
//  CustomerUITextField.m
//  UI02_UILable_UITextField_UIImageView_UIButton
//
//  Created by aaaaaa on 16/6/6.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "CustomerUITextField.h"

@implementation CustomerUITextField

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self setPropertys];
    }
    return self;
}


#pragma mark - UITextField常用属性
- (void)setPropertys{
    self.font = [UIFont systemFontOfSize:20.0f];
    self.borderStyle = UITextBorderStyleRoundedRect;
//    self.text = @"233333333";
    
    //对齐方式会影响光标位置
//    self.textAlignment = NSTextAlignmentRight;
    self.textColor = [UIColor redColor];
    
    //占位符 text有值的时候，占位符不会显示
    self.placeholder = @"请输入用户名";
   
    //清除按钮
    self.clearButtonMode = UITextFieldViewModeWhileEditing;
    
    //在编辑开始时，清除文本框内容
    self.clearsOnBeginEditing = YES;
    
    //是否允许文本框编辑
//    self.enabled = NO;
    
    
    
#pragma mark - UITextInputTraits 协议的属性
    
    //键盘类型
//    self.keyboardType = UIKeyboardTypeNumberPad;
    
    //键盘显示样式
    self.keyboardAppearance = UIKeyboardAppearanceAlert;
    //return键的作用
    self.returnKeyType = UIReturnKeyNext;
    
    //密文输入
    self.secureTextEntry = NO;
    
    
}


























@end
